package com.wanglj.controller;

import com.wanglj.dto.TicketDTO;
import com.wanglj.service.TicketServiceImpl;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author 955
 * @title
 * @date 2020/11/30 17:29
 */
@RestController
public class MovieController {
    @Resource
    private TicketServiceImpl service;
    @PostMapping("/movies")
    public String buy(@RequestBody TicketDTO ticketDTO){
            return service.buy(ticketDTO.getName(),ticketDTO.getNum());
    }
}
